package com.shundr.common.view;

import android.app.Dialog;
import android.content.Context;
import android.os.Bundle;
import android.widget.Button;
import android.widget.TextView;

/**
 * 
 * DeleteDialog
 * 
 * @author larry 2015-4-28 下午2:31:46 
 * @version 1.0.0
 *
 */
public class DialogDisplay extends Dialog {
	private Context context;
	private String content="";
	private TextView deleteContent;
	private Button deleteSure, notDelete;
	private String title;
	private OnDisplayListener displayListener;

	public DialogDisplay(Context context, String content,String title) {
		super(context);
		this.context = context;
		this.content = content;
		this.title = title;
	}
	
	public DialogDisplay(Context context, String content) {
		super(context);
		this.context = context;
		this.content = content;
	}
	
	

	@Override
	protected void onCreate(Bundle savedInstanceState) {
		super.onCreate(savedInstanceState);
//		setContentView(R.layout.dialog_display_note);
//		setIcon(android.R.drawable.ic_dialog_info);
//		if(StringUtil.isNull(title)){
//			setTitle("标题");
//		}else{
//			setTitle(title);
//		}
//		deleteContent = (TextView) findViewById(R.id.delete_content);
//		deleteSure = (Button) findViewById(R.id.delete_sure);
//		notDelete = (Button) findViewById(R.id.not_to_delete);
//		deleteContent.setText(content);
//		deleteSure.setOnClickListener(new View.OnClickListener() {
//
//			@Override
//			public void onClick(View v) {
//				if (displayListener != null)
//					displayListener.confirm();
//				dismiss();
//			}
//		});
//
//		notDelete.setOnClickListener(new View.OnClickListener() {
//
//			@Override
//			public void onClick(View v) {
//				if (displayListener != null)
//					displayListener.cancel();
//				dismiss();
//			}
//		});
	}
	
	public void setDisplayListener(OnDisplayListener displayListener) {
		this.displayListener = displayListener;
	}

	public interface OnDisplayListener {
		public void confirm();
		public void cancel();
	}

}
